<!-- eslint-disable vue/multi-word-component-names -->
<template>
    <div>公司管理 <button @click="ggggg()">我要跳转到其它页面</button> </div>
</template>
<script state lang="ts"></script>
<script lang="ts">
export default {
  name: 'conpanypage',
  data () {
    return {
      id: 1,
    };
  },
  methods: {
    ggggg() {
      this.id++;
      this.$router.push({ name: 'conpany',query: { id: this.id } });
    }
  }
  beforeRouteEnter (to, from, next) {
    console.log('有人打算进入公司管理');
    next();
  },
  beforeRouteLeave (to, from, next) {
    const { path } = to;
    if (path !== '/qu') next();
  }
};
</script>
<style lang="scss" scoped>

</style>
